<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<% 
	String skin="default";
	Cookie[] cs=request.getCookies();
	for(Cookie cookie:cs){
		if(cookie.getName().equalsIgnoreCase("ace-data-skin")){
			skin=cookie.getValue();
		}
	}
%>
<c:set var="skin" value="<%=skin%>" scope="request"/> 
<!DOCTYPE html>
<html lang="en" class="h100">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>后台管理</title>
	<jsp:include page="/WEB-INF/views/commons/lib.jsp"/>
</head>

<body class="${skin} h100">


<script>
	function changePassword(){
	//	$("#add_grid-table").click(function(){
			RM.open("修改密码", '/system/user/editPassword.do',800,550);
		
	//	});	

	}
	
	function Userinfo(){
		//	$("#add_grid-table").click(function(){
				RM.open("个人信息", '/system/user/editUserInfo.do',800,550);
			
		//	});	

		}

//
	//function changePassword(){
	//	var html="<div style=\"height:150px;\">";
	//		html+=  "<p id=\"form-prompt\"></p>";
	//		html+=	"<label class=\"col-sm-3 control-label \" for=\"form-field-1\"> 原始密码 </label>";
	//		html+=	"<input type=\"password\" id=\"form-old-password\" class=\"col-xs-10 \" placeholder=\"old password\"/>";
	//		html+=	"<label class=\"col-sm-3 control-label \" for=\"form-field-1\"> 修改密码 </label>";
	//		html+=	"<input type=\"password\" id=\"form-new-password\" class=\"col-xs-10 \" placeholder=\"new password\"/>";
	//		html+="</div>";
	//	bootbox.dialog({
	//		message: html,
	//		title: "修改密码",
	//		show: function(){
	//			alert(1);
	//		},
	//		buttons: {
	//			"success":{
	//				label: "确定",
	//				callback: function(){
	//					var _old = $.trim($("#form-old-password").val());
	//					var _new = $.trim($("#form-new-password").val());
	//					if(_old==""){
	//						$("#form-prompt").addClass("ui-state-error").html("请输入原始密码");
	//						return false;
	//					}
	//					if(_new==""){
	//						$("#form-prompt").addClass("ui-state-error").html("请输入修改密码");
	//						return false;
	//					}
	//					$.post("<%=request.getContextPath()%>/admin/core/user/update_password.do",{oldpw:_old,newpw:_new},function(data){
	//						$("#form-prompt").addClass("ui-state-error").html(data.message);
	//						if(data.code==0){
	//							setTimeout("bootbox.hideAll()",1000);
	//						}
	//					},'json');
	//					return false;
	//				}
	//			}
	//		}
	//	});
	//}
</script>
	<!-- 头部 -->
	<div class="navbar navbar-default" id="navbar">
	<script type="text/javascript">
	try{ace.settings.check('navbar' , 'fixed')}catch(e){}
	</script>
		<div class="navbar-container" id="navbar-container">
			<!-- 项目名称 -->
			<div class="navbar-header pull-left">
				<a class="navbar-brand" href="/" target="_blank"><small><i class="icon-leaf"></i>&nbsp;后台管理</small></a>
			</div>
			<!-- 信息区域 -->
			<div class="navbar-header pull-right" role="navigation">
				<ul class="nav ace-nav">
					<li class="purple">
						<a data-toggle="dropdown" class="dropdown-toggle" href="#">
							<i class="icon-bell-alt"></i>
							<span class="badge badge-important">8</span>
						</a>

						<ul class="pull-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-close">
							<li class="dropdown-header">
								<i class="icon-warning-sign"></i>
								8条通知
							</li>

							<li>
								<a href="#">
									<div class="clearfix">
										<span class="pull-left">
											<i class="btn btn-xs no-hover btn-pink icon-comment"></i>
											新闻评论
										</span>
										<span class="pull-right badge badge-info">+12</span>
									</div>
								</a>
							</li>

							<li>
								<a href="#">
									<i class="btn btn-xs btn-primary icon-user"></i>
									切换为编辑登录..
								</a>
							</li>

							<li>
								<a href="#">
									<div class="clearfix">
										<span class="pull-left">
											<i class="btn btn-xs no-hover btn-success icon-shopping-cart"></i>
											新订单
										</span>
										<span class="pull-right badge badge-success">+8</span>
									</div>
								</a>
							</li>

							<li>
								<a href="#">
									<div class="clearfix">
										<span class="pull-left">
											<i class="btn btn-xs no-hover btn-info icon-twitter"></i>
											粉丝
										</span>
										<span class="pull-right badge badge-info">+11</span>
									</div>
								</a>
							</li>

							<li>
								<a href="#">
									查看所有通知
									<i class="icon-arrow-right"></i>
								</a>
							</li>
						</ul>
					</li>
					<li class="green">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<i class="icon-envelope"></i>
								<span class="badge badge-success">5</span>
							</a>

							<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
								<li class="dropdown-header">
									<i class="icon-envelope-alt"></i>
									5条消息
								</li>

								<li>
									<a href="#">
										<img src="/static/assets/avatars/avatar.png" class="msg-photo" alt="Alex's Avatar">
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue">Alex:</span>
												不知道写啥 ...
											</span>

											<span class="msg-time">
												<i class="icon-time"></i>
												<span>1分钟以前</span>
											</span>
										</span>
									</a>
								</li>

								<li>
									<a href="#">
										<img src="/static/assets/avatars/avatar3.png" class="msg-photo" alt="Susan's Avatar">
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue">Susan:</span>
												不知道翻译...
											</span>

											<span class="msg-time">
												<i class="icon-time"></i>
												<span>20分钟以前</span>
											</span>
										</span>
									</a>
								</li>

								<li>
									<a href="#">
										<img src="/static/assets/avatars/avatar4.png" class="msg-photo" alt="Bob's Avatar">
										<span class="msg-body">
											<span class="msg-title">
												<span class="blue">Bob:</span>
												到底是不是英文 ...
											</span>

											<span class="msg-time">
												<i class="icon-time"></i>
												<span>下午3:15</span>
											</span>
										</span>
									</a>
								</li>

								<li>
									<a href="#">
										查看所有消息
										<i class="icon-arrow-right"></i>
									</a>
								</li>
							</ul>
						</li>
					<!-- 用户信息 -->
					<li class="light-blue">
						<a data-toggle="dropdown" href="#" class="dropdown-toggle">
							<img class="nav-user-photo" src="/static/assets/avatars/user.jpg" alt="${_XS_USER_REQUEST.userName}" />
							<span class="user-info">
								<small>Welcome,</small>
								<small>${_XS_USER_REQUEST.userName}</small>
							</span>
							<i class="icon-caret-down"></i>
						</a>
						<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
							<li>
								<a href="javascript:void(0)" onclick="Userinfo()"><i class="icon-user"  ></i>个人信息</a>
							</li>
							<li>
								<a href="javascript:void(0)" onclick="changePassword()"><i class="icon-cog"></i>密码修改</a>
							</li>
							<li class="divider"></li>
							<li>
								<a href="javascript:void(0)" onclick="RM.logout();"><i class="icon-off"></i>退出</a>
							</li>
						</ul>
					</li>
					<li class="changAce">	
						<select id="skin-colorpicker" class="hide">
							<option data-skin="default" value="#307ecc" <c:if test="${skin=='default'}">selected="selected"</c:if> >#438EB9</option>
							<option data-skin="skin-1" value="#222A2D" <c:if test="${skin=='skin-1'}">selected="selected"</c:if> >#222A2D</option>
							<option data-skin="skin-2" value="#C6487E" <c:if test="${skin=='skin-2'}">selected="selected"</c:if> >#C6487E</option>
							<option data-skin="skin-3" value="#D0D0D0" <c:if test="${skin=='skin-3'}">selected="selected"</c:if> >#D0D0D0</option>
						</select>
						<script>
							$(function(){
								$("#skin-colorpicker").bind("change",function(){
									var skin=$(this).find("option:selected").attr("data-skin");
									var date = new Date();
									date.setTime(date.getTime()+365*24*3600*1000);
									document.cookie = "ace-data-skin="+skin+";expires =" + date.toGMTString();
								});
							});
						</script>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<!-- 控制台 -->
	<div class="main-container" id="main-container">
	<script type="text/javascript">
		try{ace.settings.check('main-container' , 'fixed')}catch(e){}
	</script>
		<div class="main-container-inner">
			<a class="menu-toggler" id="menu-toggler" href="#">
				<span class="menu-text"></span>
			</a>
			<div class="sidebar" id="sidebar">
			<script type="text/javascript">
				try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
			</script>
				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
				</div>
				<jsp:include page="/WEB-INF/views/commons/menu.jsp"/>
				<script type="text/javascript">
					try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
				</script>
			</div>